package org.example.jiap.bk.controller;

import org.example.jiap.bk.model.pojo.JiapBookDetailPOJO;
import org.example.jiap.bk.service.JiapBookDetailService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/bkdetail")
public class JiapBookDetailController {
    @Resource
    private JiapBookDetailService jiapBookDetailService;

    @PostMapping("/bkregister")
    public void bookregister(@RequestBody JiapBookDetailPOJO jiapBookDetailPOJO) throws Exception {
        jiapBookDetailService.bookregister(jiapBookDetailPOJO);
    }

    @PostMapping("/bkremove")
    public void bkremove(@RequestBody JiapBookDetailPOJO jiapBookDetailPOJO) throws Exception {
        jiapBookDetailService.bkremove(jiapBookDetailPOJO);
    }

    @PostMapping("/bkalter")
    public void bkalter(@RequestBody JiapBookDetailPOJO jiapBookDetailPOJO) throws Exception {
        jiapBookDetailService.bkalter(jiapBookDetailPOJO);
    }

    @PostMapping("/bkchaxun")
    public void bkchaxun(@RequestBody JiapBookDetailPOJO jiapBookDetailPOJO) throws Exception {
        jiapBookDetailService.bkchaxun(jiapBookDetailPOJO);
    }
}
